derivable traits and trait inheritance
- description
- No value
- aliases
- No value
- tags
- No value
- created
- 2023-04-01T11:03:08
- updated
- 2023-07-15T21:30:20
- title
- derivable traits and trait inheritance
- Rust book - Appendix C: Derivable Traits
- questions about deriving traits in stack overflow
- 뭐라고? trait가 trait를 상속할 수 있다고? stack overflow
trait A {}
trait B: A {}
struct S;
impl B for S {}
impl A for S {} // separately implement both B and A
let x: &B = &S;